<%--
  Created by IntelliJ IDEA.
  User: HYGK-PC
  Date: 2022/3/24
  Time: 19:22
  To change this template use File | Settings | File Templates.
--%>
<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<html>
<head>
    <title>修改用户信息</title>

    <link rel="stylesheet" href="${pageContext.request.contextPath}/bootstrap/css/bootstrap.min.css">
    <!-- 引入js文件时，写法不一样 -->
    <script src="${pageContext.request.contextPath}/bootstrap/js/jquery-3.5.1.min.js"></script>
    <script src="${pageContext.request.contextPath}/bootstrap/js/bootstrap.min.js"></script>
</head>
<body>
<div class="container">
    <div class="row clearfix">
        <div class="col-md-12 column">
            <div class="page-header">
                <h1>
                    <small>修改用户信息</small>
                    <div style="float: right">
                        <a class="btn btn-primary" style="background-color: azure; color: black"  href="${pageContext.request.contextPath}/user/users">返回</a>
                    </div>
                </h1>
            </div>
        </div>
    </div>


    <form action="${pageContext.request.contextPath}/user/updateUser" method="post">
        <%--此处添加一个隐藏域，将id传给后端，注意name与数据库的名字要一致--%>
        <input type="hidden" name="id" value="${user.id}">
        <input type="hidden" name="uid" value="${user.uid}">
        <input type="hidden" name="u_password" value="${user.u_password}">
        <input type="hidden" name="u_role" value="${user.u_role}">
        <div class="form-group">
            <label for="u_name">用户名</label>
            <input type="text" name="u_name" class="form-control" value="${user.u_name}" id="u_name" required>
        </div>
        <div class="form-group">
            <label for="u_gender">性别</label>
            <input type="text" name="u_gender" class="form-control" value="${user.u_gender}" id="u_gender" required>
        </div>
        <div class="form-group">
            <label for="u_org">所属</label>
            <input type="text" name="u_org" class="form-control" value="${user.u_org}" id="u_org" required>
        </div>
        <div class="form-group">
            <input type="submit" class="form-control" value="修改">
        </div>

    </form>

</div>
</body>
</html>
